/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.google.code.jmarias.common.action;

import com.google.code.jmarias.common.AbstractUser;
import com.google.code.jmarias.common.Card;
import com.google.code.jmarias.common.NewTable;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author josef
 */
@XmlRootElement
public class SendTalonAction extends GameAction {

    private Card[] cards;

    public SendTalonAction() {
    }

    public SendTalonAction(List<Card> inputCards) {
        if (inputCards.size() != 2) {
            throw new IllegalArgumentException("Given cards count is " + inputCards.size());
        }
        cards = new Card[2];
        for (int i = 0; i < inputCards.size(); i++) {
            cards[i] = inputCards.get(i);
        }
    }

    @Override
    public void updateTable(NewTable table, AbstractUser user) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public Card[] getCards() {
        return cards;
    }

    public void setCards(Card[] cards) {
        this.cards = cards;
    }
}
